package com.hyf.educms.controller;


import com.hyf.commonutils.fruit;
import com.hyf.educms.entity.CrmBanner;
import com.hyf.educms.service.CrmBannerService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author atguigu
 * @since 2021-06-28
 */
@RestController
@RequestMapping("/educms/bannerfront")
//@CrossOrigin
@Api(description="普通用户轮播图")
public class BannerfrontController {

    @Autowired
    private CrmBannerService crmBannerService;


    // 查询所有的 Banner
    @GetMapping("getAllBanner")
    public fruit getAllBanner(){

       List<CrmBanner> list= crmBannerService.selectAllBanner();

        return fruit.ok().data("list",list);
    }


    @PostMapping("addBanneross")
    public fruit addBanneross(){

        return fruit.ok();
    }

}

